package com.nfIt.th03;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * ClossName:MainTest
 * Pakage:com.nfIt.th03
 * Description
 *
 * @Author L
 * @Create 2024/5/16 19:58
 * @Version 2023.1.3
 * 抽奖案列测试
 */
public class MainTest {
    public static void main(String[] args) {

        List<Integer> list = new ArrayList<>();
        //集合的一个工具类,语法：add(集合名称,要添加的元素)
        Collections.addAll(list,10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800,900);

        MyThreand myThreand = new MyThreand(list);
        Thread t1 = new Thread(myThreand);
        Thread t2 = new Thread(myThreand);

        t1.setName("抽奖箱1");
        t2.setName("抽奖箱2");

        t1.start();
        t2.start();

    }
}
